Skip to content

Collect statistics on the number of times that a domain is securely accessed per minute

Use the time_series function to truncate the value of the time field to minutes. The time field is a system field that indicates the log collection time. The timestamps in seconds are used by default. Use the security_check_domain function to check whether the domain is securely accessed. Use the count_if function to check and collect the number of times that the domain is securely accessed. The results are displayed in a line chart, in which the x-axis represents the time and the y-axis on the left represents the number of times that the domain is securely accessed.

SQL
status : * |
SELECT
  count_if(
    security_check_domain (http_referer) != 0
  ) AS "Secure access count",
  time_series(__time__, '1m', '%H:%i:%s', '0') as time
GROUP BY
  time